<template>
    <div>
        {{ childTitle }}
        <!-- 写法一 -->
        <button @click="handleClick">click1</button>
        <!-- 写法二 -->
        <button @click="$emit('toChildEvent2', childTitle, '哈哈哈')">click2</button>
    </div>
</template>

<script>

export default {
    data() {
        return {
            childTitle: "child-666"
        }
    },
    methods: {
        handleClick() {
            // console.log(this.childTitle);
            this.$emit("toChildEvent1", this.childTitle)
        }
    }
}
</script>

<style scoped>
div {
    background: yellow;
}
</style>